package com.artislong.service;

import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

/**
 * @author 陈敏
 * @version OrderService.java, v 1.0 2025 07 06 15:10 chenmin Exp $
 * Created on 2025 07 06
 */
@Service
public class OrderService {

    public List<OrderDetail> getOrderDetails(String userId) {
        List<OrderDetail> orderDetails = new ArrayList<>();
        for (int i = 0; i < 10; i++) {
            orderDetails.add(new OrderDetail("1000000" + i, "订单详情", userId));
        }
        return orderDetails;
    }

    public OrderDetail getOrderDetail(String userId, String orderId) {
        return new OrderDetail(orderId, "订单详情", userId);
    }

    public record OrderDetail(String orderId, String detail, String userId) {
    }

}
